home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / network / admin / dig-2.0 / dig-2 / dig.2.0 / param.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-09-01  |  961 b   |  44 lines

  1.  
  2. /*    @(#)param.h 1.1 86/07/07 SMI; from UCB 4.35 83/06/10    */
  3.     
  4. /*
  5. ** Modified version distributed with 'dig' version 2.0 from 
  6. ** University of Southern California Information Sciences Institute
  7. ** (USC-ISI). 9/1/90
  8. */
  9.  
  10. #ifndef __PARAM_HEADER__
  11. #define __PARAM_HEADER__
  12.  
  13. /*
  14.  * Fundamental constants of the implementation.
  15.  */
  16. #define    NBBY    8        /* number of bits in a byte */
  17. #define    NBPW    sizeof(int)    /* number of bytes in an integer */
  18.  
  19. #define    NULL    0
  20. #define    CMASK    0        /* default mask for file creation */
  21.  
  22. #include    <sys/types.h>
  23.  
  24. /*
  25.  * bit map related macros
  26.  */
  27. #define    setbit(a,i)    ((a)[(i)/NBBY] |= 1<<((i)%NBBY))
  28. #define    clrbit(a,i)    ((a)[(i)/NBBY] &= ~(1<<((i)%NBBY)))
  29. #define    isset(a,i)    ((a)[(i)/NBBY] & (1<<((i)%NBBY)))
  30. #define    isclr(a,i)    (((a)[(i)/NBBY] & (1<<((i)%NBBY))) == 0)
  31.  
  32. /*
  33.  * Macros for fast min/max.
  34.  */
  35. #ifndef MIN
  36. #define    MIN(a,b) (((a)<(b))?(a):(b))
  37. #endif
  38. #ifndef MAX
  39. #define    MAX(a,b) (((a)>(b))?(a):(b))
  40. #endif
  41.  
  42.  
  43. #endif !__PARAM_HEADER__
  44.